<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateParkSpaces extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('park_spaces', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('owner_name')->nullable()->comment('业主姓名');
            $table->string('owner_mobile')->nullable()->comment('业主手机号');
            $table->string('owner_house_number')->nullable()->comment('业主门牌号');
            $table->string('tenant_name')->nullable()->comment('车主姓名');
            $table->string('tenant_mobile')->nullable()->comment('车主手机号');
            $table->string('car_number')->nullable()->comment('车牌号');
            $table->string('tenant_house_number')->nullable()->comment('车主门牌号');
            $table->string('tenant_positive_imgurl')->nullable()->comment('租客身份证正面照');
            $table->string('tenant_negative_imgurl')->nullable()->comment('租客身份证反面照');
            $table->string('park_period')->nullable()->comment('车位租期');
            $table->integer('park_status')->comment('车位状态(1:闲置 2:出租 3:自用 4:人防)');
            $table->string('park_number')->comment('停车位编号');
            $table->integer('park_sort')->comment('停车位排序');
            $table->string('park_floor')->comment('所在楼层(地面/负一楼/负二楼)');
            $table->string('parks')->comment('所在楼层车位数');
            $table->integer('community_id')->comment('所属小区id');
            $table->integer('park_floor_number')->nullable()->comment('所在楼层(1:地面 2:负一楼 3:负二楼)用来排序和车位编号');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('park_spaces');
    }
}
